home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / game / actio / Wreckage_src.lha / Source / Assembly / engine_dsp_slow.asm < prev    next >
Assembly Source File  |  1998-06-30  |  584b  |  46 lines

  1. ;a0 holds address of sound
  2. ;a1 address of target sound
  3. ;d4 filter frequency
  4.  
  5.     MOVE.w    #128    ,d7
  6.     MOVE.l    #0    ,d0
  7.     
  8. _dsp_loop1:
  9.     MOVE.b    -1(a0,d0.l)    ,d1
  10.     EXT.w    d1
  11.     MOVE.b    (a0,d0.l)    ,d2
  12.     EXT.w    d2
  13.     MOVE.b    1(a0,d0.l)    ,d3
  14.     EXT.w    d3
  15.     
  16.     ADD.w    d1    ,d3
  17.     
  18.     ASR.w    #1    ,d3
  19.     SUB.w    d3    ,d2
  20.     MULS.w    d4    ,d2
  21.     ASR.w    #7    ,d2
  22.     ADD.w    d3    ,d2
  23.     
  24.         
  25.  
  26.     CMP.w    #127    ,d2
  27.     BGT    _adjust_positive
  28.     CMP.w    #-128    ,d2
  29.     BLT    _adjust_negative
  30.     BRA    _dsp_loop2
  31.  
  32. _adjust_positive:
  33.     MOVE.b    #127    ,d2
  34.     BRA    _dsp_loop2
  35.  
  36. _adjust_negative:
  37.     MOVE.b    #-128    ,d2
  38.  
  39. _dsp_loop2:
  40.     
  41.     MOVE.b    d2    ,(a1,d0.l)
  42.     ADDI.l    #1    ,d0
  43.     SUBQ.w    #1    ,d7
  44.     BGT    _dsp_loop1
  45.  
  46.